User functions not showing up in User menu

Anyone know why a function added to user.idx doesn't want to display in a module's User menu?

I've had problems doing this before and not sure what caused or fixed it. This time I can't get it working.

I added my script ("filter_add_parent_headings.dxl") to directory "C:\Program Files\Telelogic\DOORS_8.1\lib\dxl\addins\user", and added this line to the user.idx file in the same directory:
filter_add_parent_headings g _ Filter: add all parent heading objects of currently displayed objects

I've tried playing with the file mode (edited in VIM) to unix & dos, but this doesn't help.
(I curently have 14 lines in the idx file: 12 scripts and 2 separator lines.)

Regards, Strathglass

BTW: I noticed even tho I deleted the default "fn" function from the IDX file, it stays in the User menu! (Now at the bottom.)
strathglass - Tue Mar 31 11:00:13 EDT 2009

Re: User functions not showing up in User menu
adevicq - Tue Mar 31 11:48:43 EDT 2009

As written in the DXL help:

Menu DXL file format
Each DXL file to be included in the menu must conform to the following comment convention:

The first line of the file contains a // comment with a single-line description of the program, which appears in the DXL Library window.
This must be followed by a /* ... */ multi-line comment which describes in more detail what the program does. This can be viewed from the DXL Library window by clicking the Describe button.
Example
File: $DOORSHOME/dxl/addins/acme/example.dxl

// A simple example program
/*
This program simply displays an ack box.
*/
ack "This is a Menu DXL example program"

Re: User functions not showing up in User menu
strathglass - Tue Mar 31 11:55:42 EDT 2009

adevicq - Tue Mar 31 11:48:43 EDT 2009
As written in the DXL help:

Menu DXL file format
Each DXL file to be included in the menu must conform to the following comment convention:

The first line of the file contains a // comment with a single-line description of the program, which appears in the DXL Library window.
This must be followed by a /* ... */ multi-line comment which describes in more detail what the program does. This can be viewed from the DXL Library window by clicking the Describe button.
Example
File: $DOORSHOME/dxl/addins/acme/example.dxl

// A simple example program
/*
This program simply displays an ack box.
*/
ack "This is a Menu DXL example program"

I'd seen that in the help before but found previously that it didn't seem to matter.
Yet when I tried that now it did fix the problem, so thanks!
Strange that it does not always seem to be required!

Regards, Strathglass.

Re: User functions not showing up in User menu
SystemAdmin - Mon Dec 21 12:50:13 EST 2009

strathglass - Tue Mar 31 11:55:42 EDT 2009
I'd seen that in the help before but found previously that it didn't seem to matter.
Yet when I tried that now it did fix the problem, so thanks!
Strange that it does not always seem to be required!

Regards, Strathglass.

I'm having the opposite problem. We upgraded from 8.1 to 9.2, and now ALL my files are showing up in our menus, not just the ones with the "correct" comments. How do I turn this off?

Re: User functions not showing up in User menu
Bob_Swan - Mon Jan 04 08:54:18 EST 2010

Ref continued apearance of 'fn' function.
Any 'correctly formed' dxl files in the folder will appear in the menu after those declared in the idx file.
They usually appear in alphabetic order of the file name.
Options to stop them showing are a) delete it, b) move it to a subfolder, c) change the extension from dxl, d)'malform' the heading blocks, (add a blank line).
Given the comment about DOORS 9 below option 'd' may no longer work.

Re: User functions not showing up in User menu
llandale - Mon Jan 04 15:30:51 EST 2010

Have indeed read the thread. Files in the IDX file must be *.dxl with proper internal comment structure. The comment line and the comment block need to be 'near the top' but I don't recall how far down it will look; but you might as well put it close to the top; it doesn't have to immediately follow the comment line. Only *.dxl files will appear in the menu. Properly formed *.dxl files in the folder but not in the IDX will indeed be displayed, showing just the file name.

The following is a well formed file:

string aa = "DD"
infoBox("DD")
// This is the comment line
string bb = "BB"
/*
This is the comment block
*/

You 'should' format it like this:

// This is the comment line, sentence what the script does
/*
This is the comment block,
paragraph or two about what the script does
*/
bla bla bla

An IDX reference to a non-existent or poorly-formed file will be ignored. You cannot redirect your IDX to *.dxl files in some other folder. Encrypted files are 'poorly-formed'. I notice the menu is created when you open the module: [1] If you modify the folder contents the next module open will show the changes. [2] If your folder is far away on the network, each open visible module will slow down as it reads ALL the files therein. The comment line and comment block are displayed when browsing the DXL library.

I don't recall the rules for the IDX's sibling *.hlp file, but IIRC it must not be empty but really doesn't matter what's in it.

Never in the past nor now in v92 can I make a non-*.dxl file, nor a *.dxl file with improper format, display in the menu. I see no change in v9200 in this regard. I wonder why it does for the other posters.

  • Louie